﻿<include file="Public/_meta" />

<title>添加中介</title>
</head>
<body>
<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-agent-alert">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>中介名称：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="hidden"  value="{$agent.agent_id}"   name="agentid">
				<input type="text" class="input-text" value="{$agent.company_name}"   name="agentname">
			</div>
		</div>

		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>

﻿<include file="Public/_footer" />
<script type="text/javascript">
var index = parent.layer.getFrameIndex(window.name)
$("#form-agent-alert").submit(function(){
	$(".radius").attr('type','button');
        $.ajax({
          url:'{:U("Media/editCheck")}',
          type:'post',
          data:$('#form-agent-alert').serialize(),
          dataType:'json',
          success:function(data){
            if(data.ResultCode == '200'){
              layer.msg(data.ResultMessage,{time:1000},function(){
                  parent.window.location.reload()
                  parent.layer.close(index);
              });
            }
            else if(data.ResultCode == '500'){
                layer.msg(data.ResultMessage,{time:1000},function(){

                })
            }
          }
        })
        return false;
	});
</script>
</body>
</html>
